package com.iflytek.sbd.filter;

import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @program: sbd
 * @description:
 * @author: 陈英俊
 * @create: 2021-12-30 10:31
 */

//@WebFilter(urlPatterns = {"/demo/*"})
public class LoginFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("初始化LoginFilter(1)");
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("进入LoginFilter(1)");
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {
    }
}
